import { useCacheStore } from "./../store/modules/cache";

export const useTouchAction = () => {
  const cacheStore = useCacheStore();
  const setTouchAction = () => {
    cacheStore.touchActionDiabled = !cacheStore.touchActionDiabled;
    if (cacheStore.touchActionDiabled) {
      document.body.classList.add("no-touch");
    } else {
      document.body.classList.remove("no-touch");
    }
  };
  return {
    setTouchAction,
  };
};
